package com.liao.servlet;

import com.liao.entity.PatientRandomExtract;
import com.liao.service.PatientDetailService;
import com.liao.service.PatientRandomExtractService;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import java.io.IOException;

@WebServlet("/patientRandom")
public class PatientRandomExtractServlet extends HttpServlet {
    @Override
    public void service(ServletRequest req, ServletResponse response) throws ServletException, IOException {
        PatientRandomExtractService service=new PatientRandomExtractService();
        String json=service.findAll();
        //2.响应结果
        response.setContentType("application/json;charset=utf-8");
        response.getWriter().write(json);
    }
}
/*
[{"taskId":"1","patientId":"3","startTime":"20210719","searchKeywords":"药","clickCategoryIds":"99"}]
*/